﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcProject.Models.ContractInfo>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Delete
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>删除</h2>

    <h3>确定要删除这个合同及合同相关的附件吗?</h3>
    <fieldset>
         <legend>合同信息</legend>
        <div class="display-label">
            合同类型</div>
        <div class="display-field">
            <%: Model.ContractType == 1 ? "项目合同" : "人员合同"%></div>
        <div class="display-label">
            合同名称</div>
        <div class="display-field">
            <%: Model.ContractName %></div>
        <div class="display-label">
            合同开始时间</div>
        <div class="display-field">
            <%: String.Format("{0:g}", Model.ContractStartDate) %></div>
        <div class="display-label">
            合同结束时间</div>
        <div class="display-field">
            <%: String.Format("{0:g}", Model.ContractEndDate) %></div>
        <div class="display-label">
            合同金额</div>
        <div class="display-field">
            <%: Model.ContractMoney %></div>
        <div class="display-label">
            合同备注</div>
        <div class="display-field">
            <%: Model.ContractNote %></div>
        <div class="display-label">
            合同附件
        </div>
        <div class="display-field">
            <div>
                <table>
                    <tr>
                        <th>
                            附件
                        </th>
                        <th>
                        </th>
                    </tr>
                    <%
                        IEnumerable<MvcProject.Models.AttachInfo> AttachInfos = (IEnumerable<MvcProject.Models.AttachInfo>)ViewData["attachinfos"];
                        if (AttachInfos != null) foreach (var item in AttachInfos)
                            { %>
                    <tr>
                        <td>
                            <%:  Html.ActionLink(item.attachmentName, "../AttachInfo/" + item.attachmentPath, new { }, new { target = "_blank",title="点击查看" })%>
                        </td>
                    </tr>
                    <% } %>
                </table>
            </div>
        </div>
        <div class="display-label">
            创建人</div>
        <div class="display-field">
            <%: Model.CreateUserName %></div>
        <div class="display-label">
            创建时间</div>
        <div class="display-field">
            <%: String.Format("{0:g}", Model.CreateDate) %></div>
        
    </fieldset>
    <% using (Html.BeginForm()) { %>
        <p>
		    <input type="submit" value="删除" /> |
		    <%: Html.ActionLink("返回合同列表", "Index") %>
        </p>
    <% } %>

</asp:Content>

